package MAR.Core;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Felipe
 */
public class Field implements Member{
    private String name;
    private Class type;
    private Class declaringClass;

    public Field(String name, Class type, Class declaringClass){
        this.name = name;
        this.type = type;
        this.declaringClass = declaringClass;
    }

    public String getName(){
        return this.name;
    }

    public Class getDeclaringClass(){
        return this.declaringClass;
    }

    public Class getType(){
        return this.type;
    }

    public Object get(Reflector reflector){
        return reflector.getFieldValue(this.name);
    }

    public void set(Reflector reflector, Object value){
        reflector.setFieldValue(this.name, value);
    }
}
